package Task36;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            Set<String> strings = new HashSet<>();
            String name = scanner.nextLine();
            int start = 0;
            int end = 0;
            while (start < name.length() ) {
                if (name.charAt(start) == '\"') {
                    end = name.indexOf('\"', start + 1);
                    strings.add(name.substring(start + 1, end));
                    start = end + 2;
                } else {
                    end = name.indexOf(',', start + 1);
                    if (end == -1) {
                        strings.add(name.substring(start, name.length()));
                        break;
                    }
                    strings.add(name.substring(start, end));
                    start = end + 1;
                }
            }
            name = scanner.nextLine();
            if (strings.contains(name)) {
                System.out.println("Ignore");
            } else {
                System.out.println("Important!");
            }
        }
    }
}
